package com.xh.core.event;

import lombok.Data;
import org.springframework.context.ApplicationEvent;

import javax.servlet.http.HttpServletRequest;

/*
 * @Author daiwei
 * @Description 导出excel事件监听
 * @Date 2018/8/13 07:16
 **/
@Data
public class ExportExcelEvent extends ApplicationEvent {

    private String exportId;
    private HttpServletRequest request;
    private Integer status;
    private String url;

    /**
     * 构造方法
     * @param exportId 导出ID
     * @param source 调用对象
     * @param request request
     * @param status 导出状态（-1失败，0导出中，1导出成功）
     */
    public ExportExcelEvent(String exportId,Object source, HttpServletRequest request,Integer status) {
        super(source);
        this.request=request;
        this.status=status;
    }

    /**
     * 构造方法
     * @param exportId 导出ID
     * @param source 调用对象
     * @param request request
     * @param status 导出状态（-1失败，0导出中，1导出成功）
     * @param url 文件地址路径
     */
    public ExportExcelEvent(String exportId,Object source, HttpServletRequest request,Integer status,String url) {
        super(source);
        this.request=request;
        this.status=status;
        this.url=url;
    }
}
